package edu.zut.hb.software.train.CustomerManager.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import edu.zut.hb.software.base.service.impl.GenericManagerImpl;
import edu.zut.hb.software.train.Customer.dao.CustomerDao;
import edu.zut.hb.software.train.Customer.domain.Customer;
import edu.zut.hb.software.train.CustomerManager.service.CustomerManager;




@Service("customerManager")
public class CustomerManagerImpl extends GenericManagerImpl<Customer, Long> implements CustomerManager {

	
	CustomerDao customerDao;
	
	@Autowired
	public void setCustomerDao(CustomerDao customerDao) {
		this.customerDao = customerDao;
		this.dao = this.customerDao;
	}

	@Override
	public List<Customer> getAll() {
		List<Customer> all = this.customerDao.findAll();
		if (logger.isInfoEnabled()) {
			logger.info("getAll() - List<Customer> all={}", all); //$NON-NLS-1$
		}
		return all;
	}
 
}